/**
 * @author liangxi
 * @since 2023/12/21
 * @details
 */

#ifndef DESIGNPATTERN_PIZZAFM_H
#define DESIGNPATTERN_PIZZAFM_H


#include <string>
#include <vector>
#include <iostream>

namespace Factory_FM {
    class PizzaFM {
    public:

        virtual ~PizzaFM() = default;

        void prepare() const {
            std::cout << "Preparing " << name << std::endl;
            std::cout << "Tossing dough..." << std::endl;
            std::cout << "Adding sauce..." << std::endl;
            std::cout << "Adding toppings: " << std::endl;
            for (const auto &item: toppings) {
                std::cout << "  " << item << std::endl;
            }
        }

        void bake() const {
            std::cout << "Bake for 25 minutes at 350" << name << std::endl;
        }

        virtual void cut() const {
            std::cout << "Cutting the pizza into diagonal slices" << name << std::endl;
        }

        void box() const {
            std::cout << "Place pizza in official PizzaStore1 box" << name << std::endl;
        }

        [[nodiscard]] std::string getName() const { return this->name; }

        std::string toString();

        std::string name;
        std::string dough;
        std::string sauce;
        std::vector<std::string> toppings;
    };
}

#endif //DESIGNPATTERN_PIZZAFM_H
